﻿using IceCS.Permission.Core.Enums;

namespace IceCS.Permission.Core
{
    public class AdvanceUserAction
    {
        /// <summary>
        /// 基本行为
        /// </summary>
        public static UserAction BasicAction =
            UserAction.PreviewArticle;

        /// <summary>
        /// 登录用户行为
        /// </summary>
        public static UserAction LoginUserAction =
            UserAction.PreviewArticle |
             UserAction.CommentArticle |
             UserAction.LikeArticle |
             UserAction.CollectionArticle;

        /// <summary>
        /// 文章作者行为
        /// </summary>
        public static UserAction ArticleAuthorAction =
            UserAction.PreviewArticle |
            UserAction.CommentArticle |
            UserAction.LikeArticle |
            UserAction.CollectionArticle |
            UserAction.CreateArticle |
            UserAction.EditArticle;

        /// <summary>
        /// 管理员行为
        /// </summary>
        public static UserAction AdminAction =
            UserAction.PreviewArticle |
            UserAction.CommentArticle |
            UserAction.LikeArticle |
            UserAction.CollectionArticle |
            UserAction.CreateArticle |
            UserAction.EditArticle |
            UserAction.DeleteArticle;
    }
}
